<template>
  <div class="root">
    <div class="content" :data="goodsList">
      <div class="title">{{goodsList[0].title}}</div>
      <div class="box" v-html="goodsList[0].content"></div>
    </div>
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  data () {
    return {
      goodsList: [
        {
          title: '',
          content: ''
        }
      ]
    }
  },
  created () {
    this.getGoodsList()
  },
  methods: {
    async getGoodsList () {
      const res = await this.$http.get('/api/goods/getdesc/' + this.goodsListId)
      console.log(res)
      this.goodsList = res.data.message
    }
  },
  computed: {
    ...mapState(['goodsListId'])
  }
}
</script>
<style lang="less" scoped>
.root {
  margin-top: 47px;
}
.content {
  margin: 15px;
  line-height: 30px;
  .title {
    font-size: 18px;
    font-weight: bold;
    color: #226aff;
    line-height: 32px;
    border-bottom: 1px solid #ccc;
  }
  .box {
    margin-top: 20px;
    line-height: 28px !important;
    font-size: 14px !important;
    color: #666 !important;
  }
}
// .content .box .gomeImgLoad {
//   width: 50% !important;
// }
.gomeImgLoad {
  width: 100% !important;
}
</style>
